import request from '@/core/request/index'

// 获取所有轮播图
export const getBannerList = () => {
  return request({
    url: '/set/getAllSwiper',
    method: 'post'
  })
}

// 获取公司名称
export const getCompanyName = () => {
  return request({
    url: '/set/getCompanyName',
    method: 'post'
  })
}

// 修改公司名字 set_value
export const updateCompanyName = (data) => {
  return request({
    url: '/set/changeCompanyName',
    method: 'post',
    data
  })
}


// 编辑公司介绍的接口
export const changeCompanyIntroduce = (set_text, id) => {
  return request({
    url: '/set/changeCompanyIntroduce',
    method: 'POST',
    data: {
      set_text,
      id
    }
  })
}

// 获取公司介绍 set_name
export const getCompanyIntroduce = (data) => {
  return request({
    url: '/set/getCompanyIntroduce',
    method: 'post',
    data
  })
}

// 获取所有公司介绍
export const getAllCompanyIntroduce = () => {
  return request({
    url: '/set/getAllCompanyIntroduce',
    method: 'post'
  })
}

// 部门设置
export const setDepartment = data => {
  return request({
    url: '/set/setDepartment',
    method: 'POST',
    data: {
      set_value: data
    }
  })
}

// 获取部门
export const getDepartment = () => {
  return request({
    url: '/set/getDepartment',
    method: 'POST',
  })
}

// 产品设置
export const setProduct = data => {
  return request({
    url: '/set/setProduct',
    method: 'POST',
    data: {
      set_value: data
    }
  })
}

// 获取产品
export const getProduct = () => {
  return request({
    url: '/set/getProduct',
    method: 'POST',
  })
}
